var url = "../../RHH_POSTULADO_CONTROLLER";
self.addEventListener('message', function(e) {
    var data = e.data;
    var req = new XMLHttpRequest();
    req.open("POST", url+"?proceso=cargarImagen&ci="+data.ci+"&foto="+data.foto, false);
    req.setRequestHeader("Content-Type", "application/json;  charset=utf-8");
    req.onreadystatechange = function () {
        if (req.readyState == 4 && req.status == 200) {
            self.postMessage(req.responseText);
        }   
    }   
    req.send();   
}, false);
